#!/bin/bash
# description:　install the npm package from diff registry
# version:	1.0
# author:	xiuju_lan
# contact:	xiuju_lan@sumilux.cn
#
. functions.sh


if [ -z $1 ]; then
echo "ERROR: please enter what you want to install"
exit -1
fi

if [  ${DL_SERVER} != 'ops30.sumilux.com' ]; then
NPM_RSC="--registry https://r.cnpmjs.org"
#NPM_RSC="--registry=https://registry.npm.taobao.org"
echo_and_log "--->Get npm package from $NPM_RSC"
fi

# To avoid get the old package.json
npm cache clean
for i in $*
	do
	npm $NPM_RSC install -g $i
done





